/**
 * ALYR.NET 智能体版本信息
 * 版权所有 © 2025 ALYR.NET
 * 作者: 张忆
 * 官网: https://gitee.com/Alyr_space/Builder.Alyr.Net
 */

const chalk = require('chalk');

class AlyrVersionInfo {
  constructor() {
    this.version = 'V4.2.3';
    this.releaseDate = '2025-07-29';
    this.author = '张忆';
    this.contact = {
      website: 'https://gitee.com/Alyr_space/Builder.Alyr.Net'
    };
  }

  // 显示版本信息
  displayVersion() {
    console.log(chalk.blue('╔══════════════════════════════════════════════════════════════╗'));
    console.log(chalk.blue('║                 Builder.Alyr.Net 智能体系统                   ║'));
    console.log(chalk.blue('╠══════════════════════════════════════════════════════════════╣'));
    console.log(chalk.blue(`║ 版本: ${chalk.green(this.version)}                            ║`));
    console.log(chalk.blue(`║ 发布日期: ${chalk.yellow(this.releaseDate)}                   ║`));
    console.log(chalk.blue(`║ 作者: ${chalk.cyan(this.author)}                              ║`));
    console.log(chalk.blue('╚══════════════════════════════════════════════════════════════╝'));
  }

  // 获取版本号
  getVersion() {
    return this.version;
  }

  // 获取联系方式
  getContact() {
    return this.contact;
  }

  // 检查更新提示
  checkUpdateNotice() {
    console.log(chalk.yellow('\n💡 提示: 如需技术支持请反馈官方'));
    console.log(chalk.green(`   官网: ${this.contact.website}`));
  }
}

// 如果直接运行此文件，显示版本信息
if (require.main === module) {
  const versionInfo = new AlyrVersionInfo();
  versionInfo.displayVersion();
  versionInfo.checkUpdateNotice();
}

module.exports = AlyrVersionInfo;